package com.erp.erp_servers.Menu;

import com.erp.erp_entitys.Menum.MenuEntity2;
import com.erp.erp_entitys.Menum.MenuEntity2Example;
import com.erp.erp_entitys.Resource.ResourceEntity;
import com.erp.erp_entitys.Resource.ResourceTreeEntity;

import java.util.List;

/**
 * @ClassName IResourceService
 * @Description 菜单服务接口
 * @Author songjizhen
 * @Date 2020-06-30 22:42
 * @Version 1.0
 */
public interface IMenuService {
    /**
     * 根据id删除数据
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Integer id);
    int deleteByExample(MenuEntity2Example example);


    /**
     * 新增菜单
     * @param record
     * @return
     */
    int insertSelective(MenuEntity2 record);

    /**
     * 更新菜单
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(MenuEntity2 record);

    /**
     * 返回菜单树
     * @return
     */
    List<MenuEntity2> getTree();

    /**
     * 检查code是否重复
     * @param code
     * @return
     */
    boolean getExeitBycode(String code);
    /**
     * 根据条件查询菜单
     * @param example
     * @return
     */
    List<MenuEntity2> selectByExample(MenuEntity2Example example);

}
